package com.futures.investm.activity;

import android.os.Bundle;
import android.text.TextUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.futures.investm.R;
import com.aries.ui.view.title.TitleBarView;

import butterknife.BindView;
import tech.com.commoncore.base.BaseTitleActivity;
import tech.com.commoncore.manager.GlideManager;

public class NewsDetailsActivity extends BaseTitleActivity {


    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.img)
    ImageView img;
    @BindView(R.id.tv_content)
    TextView tvContent;
    @BindView(R.id.tv_time)
    TextView tv_time;


    String strTime = "";
    String strConetnt = "";
    String strImg = "";
    String strTitle = "";


    @Override
    public void setTitleBar(TitleBarView titleBar) {
        strTime = (String) getIntent().getSerializableExtra("time");
        strConetnt = (String) getIntent().getSerializableExtra("content");
        strImg = (String) getIntent().getSerializableExtra("img");
        strTitle = (String) getIntent().getSerializableExtra("title");
    }

    @Override
    public int getContentLayout() {
        return R.layout.activity_news_details;
    }

    @Override
    public void initView(Bundle savedInstanceState) {

        if (!TextUtils.isEmpty(strConetnt)){
            tvContent.setText(strConetnt);
        }
        if (!TextUtils.isEmpty(strTime)){
            tv_time.setText(strTime);
        }
        if (!TextUtils.isEmpty(strImg)){
            GlideManager.loadImg(strImg,img);
        }
        if (!TextUtils.isEmpty(strTitle)){
            tvTitle.setText(strTitle);
        }





    }

}
